package com.ceair.flight.refund.location.dt.enums;

/**
 * <p>Title: 积分类型枚举类</p>
 * <p>动态积分只针对东航非AOX的积分</p>
 * <p>标准积分目前只针对东航AOX积分</p>
 * <p>联盟积分含有国内国际其它联盟航司积分数据,需要额外税费</p>
 *
 * @author sw.liu
 * @date 2018年10月30日
 */
public enum PointTypeEnum {

    DJF("DJF", "dynamic points", "动态积分"),
    SJF("SJF", "standard points", "标准积分"),
    MJF("MJF", "mcab points", "联盟积分");

    private final String code;
    private final String enDesc;
    private final String cnDesc;

    private PointTypeEnum(String code, String enDesc, String cnDesc) {
        this.code = code;
        this.enDesc = enDesc;
        this.cnDesc = cnDesc;
    }

    public static PointTypeEnum getByCode(String code) {
        for (PointTypeEnum pointTypeEnum : values()) {
            if (pointTypeEnum.getCode().equalsIgnoreCase(code)) {
                return pointTypeEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getEnDesc() {
        return enDesc;
    }

    public String getCnDesc() {
        return cnDesc;
    }

}
